<?php
include 'config.php';


    
function execQuery($query)
{
    global $conf;
    return mysql_query($query, $conf['connection']);
}

function getResultSize($result)
{
    return mysql_num_rows($result);
}

function getRowAsArray($result)
{
    return mysql_fetch_array($result, MYSQL_NUM);
}

function getRowAsAssoc($result)
{
    return mysql_fetch_assoc($result);
}

function getLastInsertId()
{
    global $conf;
    return mysql_insert_id($conf['connection']);
}

function lastSqlError($file = null, $line = null)
{
    global $conf;
    $error = mysql_error($conf['connection']);
/*
    $where = "file: $file:$line";
    if ($file != null)
    {
        echo $error." at ".$where;
    } else
    {
        echo $error;
    }
*/
    
}

function lastSqlErrorS()
{
    global $conf;
    $error = mysql_error($conf['connection']);
        echo $error;

}

function lastErrno()
{
    global $conf;
    return mysql_errno($conf['connection']);

}

?>
